memory limit: 128 MB
subtask 1: 1-10, 26 
subtask 2: 11-20, 38 
subtask 3: 21-30, 36 

 feedback